package com.android.Translator.Model.utils;

import android.os.Handler;
import android.os.Message;

import com.android.Translator.Presenter.TranslatorPresenter;
import com.example.entity.DataSearch;

public class ModelHandler {
	
		public static Handler TranslateResultHandler = new Handler() {
			public void handleMessage(Message msg) {
				super.handleMessage(msg);
				DataSearch result = (DataSearch) msg.obj;
				try {
					if(msg.arg1 != 1)
						TranslatorPresenter.setResultToListLocalView(result);
					else
					{
						TranslatorPresenter.dismissProcessCircle();
						TranslatorPresenter.showFinishDialog();
					}
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		};
}
